﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Security.Permissions;
using System.Web;
using System.Web.Configuration;

namespace Galaktika.BI.Silverlight.ClientApp.Web.Configuration
{
    [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
    public sealed class ScriptingCommandsSection : ConfigurationSection
    {
        private static readonly ConfigurationProperty _propDataServices = new ConfigurationProperty("dataServices", typeof(DataServiceCommandCollection), null, ConfigurationPropertyOptions.IsDefaultCollection);

        public ScriptingCommandsSection()
        {
        }

        [ConfigurationProperty("dataServices")]
        public DataServiceCommandCollection DataServices
        {
            get
            {
                return this.GetDataServiceCommands();
            }
        }

        private DataServiceCommandCollection GetDataServiceCommands()
        {
            return (DataServiceCommandCollection)base[_propDataServices];
        }
    }
}
